package com.lhl.Test;

import com.lhl.dao.StudentDao;
import com.lhl.dao.StudentDaoImpl;
import com.lhl.entity.Student;

import java.util.Date;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        StudentDao dao = new StudentDaoImpl();
        //测试查询所有学生
//        List<Student> students = dao.queryAllStudents();
//        for (Student student : students) {
//            System.out.println(student);
//        }
        
        //测试根据id查询学生
//        Student student = dao.queryStudent(1);
//        System.out.println(student);
        
        //测试加学生信息
//        Student student = new Student("巴巴","男",88,new Date());
//        int i = dao.insertStudent(student);
//        System.out.println(i);

        //测试修改学生信息
//        Student student = new Student(9,"八九","女",78,new Date());
//        int i = dao.updateStudent(student);
//        System.out.println(i);
        //测试根据id删除学生信息
//        int i = dao.deleteStudent(9);
//        System.out.println(i);
    }
}
